﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ZhwangTool
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void PicEditorUserControl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void AdornerUserControl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (tabControl.SelectedIndex==2)
            {
                Grid grid = tabControl.SelectedContent as Grid;

                if (grid != null)
                {

                    //AdornerUserControl adornerUserControl = grid?.Children[0] as AdornerUserControl;

                    //if (adornerUserControl!=null)
                    //{
                        


                    //}
                    
                }



                //MessageBox.Show(tabControl.SelectedValue.GetType().ToString());

                //MessageBox.Show(tabControl.SelectedContent.GetType().ToString());

                //Grid grid = tabControl.SelectedContent as Grid;


                //AdornerUserControl adornerUserControl = grid.Children[0] as AdornerUserControl;


                //foreach (UIElement item in grid.Children)
                //{


                //}  



                //tabControl.SelectedContent.GetType();



            }
        }

        private void TabItem_Initialized(object sender, EventArgs e)
        {

        }
    }
}
